/**
 * 
 */
package com.lehecai.core.lottery;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.lehecai.core.IntegerBeanLabelItem;

/**
 * 用于替换支付宝支付时银行名称
 * @author He Wang
 *
 */
public class BankTypeForPay extends IntegerBeanLabelItem {


	private static final long serialVersionUID = -530998782071935781L;

	private static final Logger logger = LoggerFactory.getLogger(BankTypeForPay.class.getName());
	
	/**
	 * 支付宝银行名称替换
	 */
	private static Map<Integer, BankTypeForPay> alipayMap = new HashMap<Integer,BankTypeForPay>();
	
	protected BankTypeForPay(String name, int value) {
		super(BankTypeForPay.class.getName(), name, value);
		alipayMap.put(value, this);
	}
	
	public static BankTypeForPay getItem(int value){
		try {
			return (BankTypeForPay)BankTypeForPay.getResult(BankTypeForPay.class.getName(), value);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
			return null;
		}
	}
	
	public static Map<Integer, BankTypeForPay> getAlipayMap() {
		return alipayMap;
	}
	
	public static final BankTypeForPay CEB = new BankTypeForPay("中国光大银行", 12);
	public static final BankTypeForPay MBC = new BankTypeForPay("中国民生银行", 13);
	
}
